package com.cetc.nsfx.service;
import com.cetc.nsfx.base.BaseService;
import com.cetc.nsfx.mapper.TestMapper;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import org.apache.ibatis.session.RowBounds;
import org.mybatis.spring.SqlSessionUtils;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by lxm_5678 on 2015/12/22.
 */

@Service
public class TestService extends BaseService {

    @Autowired
    TestMapper testMapper;
    public List<Map<String,String>> getUserList(){
        Map<String, String> params = new HashMap<String, String>();
        return testMapper.getUserList(params);
    }

    public List<Map<String, String>> pageList() {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("test","test");

        return this.getSqlSessionTemplate().selectList("getUserList", params,
                new PageBounds(Integer.valueOf(3), Integer.valueOf(5)));

    }
}
